
<table width="100%">
  <tr>
    <th>name</th>
    <th>status</th>
    <th>position</th>
    <th></th>
  </tr>
  <?php //takes out the last entry, which containt information about list of position of current template 
  	$positions = View::$_["listModule"]["listPos"];
  	$entry = View::$_["listModule"];
  for($i = 0 ; $i < count($entry)-1; $i++){ ?>
  <form action="/admin/home/" method="POST" enctype="multipart/form-data">
  <tr>  
    <td><input type="text" name="name" value="<?php echo $entry[$i][0];?>" READONLY/></td>    
    <td><select name="status">
    		<?php for($j= 0; $j<2; $j++) {?>
    			<option <?php if ($j == $entry[$i][1]){ ?> selected <?php }?> >
    				<?php echo $j;?>
    			</option>    			
    		<?php }?>
   	    </select>
    </td>
    <td><select name="position" >
    		<?php foreach ($positions as $pos) {?>
    			<option <?php if ($entry[$i][2] == $pos){ ?> selected <?php }?> >
    				<?php echo $pos;?>
    			</option>    			
    		<?php }?>
    	</select>
    </td>
    <td><input type="submit" value="update" /></td>    
  </tr>
  </form>
  <?php } ?>
 
</table>


